

@echo off
taskkill /im server.exe /f
taskkill /im client.exe /f
taskkill /im ai.exe     /f
PATH=%PATH%;..\..\..\b\MinGW\bin;
set opt=-g -std=c99 --pedantic -Wextra -Wall
@echo on

gcc %opt% -c ..\src\picking.c -o picking.o
gcc %opt% -c ..\src\camera.c  -o camera.o
gcc %opt% -c ..\src\model.c   -o model.o
gcc %opt% -c ..\src\path.c    -o path.o
gcc %opt% -c ..\src\gui.c     -o gui.o

gcc %opt% -c ..\src\draw.c    -o draw.o
gcc %opt% -c ..\src\nograph.c -o nograph.o

gcc %opt% -c ..\src\client.c  -o client.o
gcc %opt% -c ..\src\server.c  -o server.o
gcc %opt% -c ..\src\ai.c      -o ai.o

gcc -o server.exe %opt% ^
server.o  ^
-lmingw32 -lSDLmain -lSDL -lSDL_net
	
gcc -o ai.exe %opt% ^
ai.o nograph.o path.o ^
-lmingw32 -lSDLmain -lSDL -lSDL_net

gcc -o client.exe %opt% ^
picking.o camera.o model.o path.o gui.o draw.o nograph.o client.o ^
-lmingw32 -lglew32 -lSDLmain -lSDL -lSDL_image -lSDL_ttf ^
-lSDL_net -lopengl32 -lglu32
